package com.example.shop.mapper;



import org.apache.ibatis.annotations.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.shop.pojo.User;
import com.example.shop.pojo.UserDto;

@Mapper
public interface UserMapper extends BaseMapper<User>  {
	/**
	 * 保存user
	 * @param user
	 * @return
	 */	
	public Integer save(User user);
	
	/**
	 * 根据账号查询user
	 * @param account
	 * @return
	 */
	public UserDto selectByAccount(String account);
	
	/**
	 * 根据id查询user
	 * @param id
	 * @return
	 */	
	public User selectById(Long id);
	
	/**
	 * 根据userName查询user
	 */
	public User selectByUserName(String userName);
	
	/**
	 * 更新信息根据id
	 */
	public int updateById(User user);
}
